import Foundation

func SortSelection(nums: [Int]?) -> [Int]? {
  guard nums != nil else {
    return nil
  }
  let array = nums ?? []
  let length = array.count
  for i in 0...length - 2 {
    for j in i..length - i - 1 {
      print("j=\(j) item=\(array[j])")
    }
  }
}